//
// Created by 张越洋666 on 2025/11/9.
//

#ifndef XITONG_SHAOKAO_ADMIN_ZSGC_H
#define XITONG_SHAOKAO_ADMIN_ZSGC_H

//定义管理员结构体
typedef struct{
    int id;
    char name[20];
    char phone[20];
    char password[20];
}ADMIN;


//定义员工表结构体
typedef struct{
    char employee_name[20];
    char position[20];
    char employee_num[20];
}EMPLOYEE;

//定义员工考勤表结构体
typedef struct{
    int attendance_id;
    int employee_id;
    //考勤日期
    char attendance_date[20];
    char clock_in_time[20];
    char clock_out_time[20];
    //(如: 正常、迟到、早退、缺勤)
    char attendance_status[20];
    //请假时长
    char leave_hours[20];
}ATTENDANCE;
int insert_admin_user(ADMIN * admin);
int insert_employee_user(EMPLOYEE * employee);
int insert_attendance_user(ATTENDANCE * attendance);
int query_admin_name(char*name);
int query_employee_name(char*employee_name);
int query_attendance_name(char* employee_name);
int update_admin_user(ADMIN * admin);
int update_employee_user(EMPLOYEE * employee);
int update_attendance_user(ATTENDANCE * attendance);
int delete_admin_user(int id);
int delete_employee_user(EMPLOYEE * employee);
int delete_attendance_user(ATTENDANCE * attendance);
int login_admin_user(char *phone,char *password);
int login_user(char *name,char *password);
int logic_and_register();


#endif //XITONG_SHAOKAO_ADMIN_ZSGC_H
